package gbench.sandbox.matrix.algebra.numberic;

import org.junit.jupiter.api.Test;
import static gbench.common.tree.LittleTree.IRecord.*;
import static gbench.commonApp.data.DataMatrixApp.MathOps.*;
import java.util.Arrays;
import java.util.stream.Stream;

import gbench.common.fs.XlsFile.DataMatrix;
import gbench.common.tree.LittleTree.Tuple2;
import gbench.commonApp.data.DataMatrixApp;
import static gbench.common.tree.LittleTree.*;

/**
 * 
 * @author gbench
 *
 */
public class JunitMathOps extends DataMatrixApp{
    
    @Test
    public void foo() {
        final var aa = FA(A(1d,2d,3d,4d,5d),0d,10);
        final var bb = FA(A(2d,4d,6d,8d,10d),1d,10);
        final var cc = div(aa,bb);
        println(Arrays.asList(aa));
        println(Arrays.asList(cc));
        
        var dd = transpose(A(aa,bb,cc));
        var ff = DataMatrix.of(dd);
        println(ff);
        
        Tuple2.zip2stream(aa,bb).forEach(p->{
            println(p);
        });
        
        Stream.of(A(1,2,3,4,5)).map(kvp(e->e+"kk")).forEach(e->{
            System.out.println(e);
        });
        
        A(1,2,3d);
    }
}
